<?php
class forum_showMod extends commonMod
{
    public function __construct()
    {
        parent::__construct();
    }

    public function index(){
    	$this->$tid=intval($_GET['id']);
    	$this->tid=$this->$tid;
        $this->info=$this->model->table("forum_cards_bbs")->where("id='.$tid.'")->find();
        $this->display('forum_show.html');
    }

/*     public function add(){
    	$this->show();
    }

    public function act_add(){
    	$data = $_POST;
    	$this->model->table("forum_bbs")->data($data)->insert();
        $this->msg('添加成功！',1);
    } */

	/*public function index() {
		$this->goods_list = $this->model->table("forum_cards_bbs")->order("id desc")->select(); //返回值二维数
		$this->display("online_shop.html");
	}*/
    public function forum_show()
    {
    	$id = $_GET['id'];
    	$this->forum_show = $this->model->table("forum_cards_bbs")->where("id ='".$id."' ")->find();
    	
    	$this->display("forum_show.html");
    }
    
    public function forum_collection()
    {
    	$id = $_GET['id'];
    	$this->forum_collection = $this->model->table("forum_cards_bbs")->where("id ='".$id."' ")->find();
    	$this->display("forum_collection.html");
    }
    
    public function add_save()
    {
    	$data['forum_title'] = $_POST['title'];
    	$data['forum_content'] = $_POST['content'];
    	$data['release_time'] = time();
    	$data['forum_type'] = $_POST['mod'];
    	$this->model->table("forum_cards_bbs")->data($data)->insert();
    	$this->forum_show();
    }
    
    public function replay_save()
    {
    	$id = $_POST['info_id'];
    	//dump($id,true);
    	$data['id'] = $id;
    	$data['replay_content'] = $_POST['r_content'];
    	$data['replay_time'] = time();
    	$this->model->table("forum_replay_bbs")->data($data)->insert();
    	$this->forum_show();
    }

}